<!-- in-item 自定义slot -->
<template>
    <el-form-item class="c-item" :label="name" :rules="required ? {required: true} : rules ">
        <slot></slot>
    </el-form-item>
</template>

<script setup name="in-item">

defineProps({
    name: {},
    // 表单校验 
    rules: {},
    required: {
        type: Boolean
    }
})

</script>

<style scoped>

</style>
